<template>
  <div class="telelogin">
      <section class="tele">
        <input type="text" placeholder="请输入手机号码" autofocus>
      </section>
      <section class="pass">
        <input type="password" placeholder="请输入密码">
        <span>忘记密码</span>
      </section>
      <section class="yan">
        <input type="text" placeholder="请输入验证码">
        <img @click="getRandom()" :src="getRandom()" alt="">
      </section>
      <button class="log">登录</button>
      <div class="regi">快速注册 &gt;</div>
  </div>
</template>

<script>
export default {
  data(){
    return {
      srcarr:["/img/sui1.jpg","/img/sui2.jpg","/img/sui3.jpg","/img/sui4.jpg","/img/sui5.jpg",],
      suisrc:'',
    }
  },
  methods:{
    getRandom(){
      this.suisrc = this.srcarr[parseInt(Math.random()*5)];
      return this.suisrc;
    }
  }
}
</script>

<style scoped>
section{
  margin: 0 auto;
  margin-bottom: 20rem;
  width: 267rem;
  height: 46rem;
  display: flex;
  align-items: center;
  border-bottom: 2px solid #cfd1d0;
}
input{
  background: #fafafa;
  height: 44rem;
  padding-left: 15rem;
}
.tele input{
  width: 100%;
  height: 100%;
}
.pass{
  justify-content: space-between;
}
.pass input{
  width: 215rem;
}
.pass span{
  color: #7a838a;
}
.yan{
  border-bottom: 0;
  justify-content: space-between;
}
.yan input{
  width: 158rem;
  border-bottom: 2px solid #cfd1d0;
}
.yan img{
  width: 88rem;
  height: 34rem;
}
.log{
  width: 268rem;
  height: 38rem;
  color: #fff;
  background: #dcdcdc;
  text-align: center;
  line-height: 38rem;
  display: block;
  margin: 0 auto;
  border-radius: 5rem;
  margin-top: 10rem;
  margin-bottom: 10rem;
}
.regi{
  text-align: right;
  color: #6c8087;
  margin-right: 47rem;
  margin-bottom: 10rem;
  margin-top: 10rem;
}
</style>